package cn.home.DYX.service.impl;

import java.util.List;

import cn.home.sysmanagement.domain.HomeTag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import cn.home.DYX.mapper.HomeDoctorMapper;
import cn.home.DYX.domain.HomeDoctor;
import cn.home.DYX.service.IHomeDoctorService;

/**
 * 医生管理Service业务层处理
 * 
 * @author 丁宇翔
 * @date 2025-04-09
 */
@Service
public class HomeDoctorServiceImpl implements IHomeDoctorService 
{
    @Autowired
    private HomeDoctorMapper homeDoctorMapper;

    /**
     * 查询医生管理
     * 
     * @param id 医生管理主键
     * @return 医生管理
     */
    @Override
    public HomeDoctor selectHomeDoctorById(Long id)
    {
        return homeDoctorMapper.selectHomeDoctorById(id);
    }

    /**
     * 查询医生管理列表
     * 
     * @param homeDoctor 医生管理
     * @return 医生管理
     */
    @Override
    public List<HomeDoctor> selectHomeDoctorList(HomeDoctor homeDoctor)
    {
        return homeDoctorMapper.selectHomeDoctorList(homeDoctor);
    }

    /**
     * 新增医生管理
     * 
     * @param homeDoctor 医生管理
     * @return 结果
     */
    @Override
    public int insertHomeDoctor(HomeDoctor homeDoctor)
    {
        return homeDoctorMapper.insertHomeDoctor(homeDoctor);
    }

    /**
     * 修改医生管理
     * 
     * @param homeDoctor 医生管理
     * @return 结果
     */
    @Override
    public int updateHomeDoctor(HomeDoctor homeDoctor)
    {
        return homeDoctorMapper.updateHomeDoctor(homeDoctor);
    }

    /**
     * 批量删除医生管理
     * 
     * @param ids 需要删除的医生管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeDoctorByIds(Long[] ids)
    {
        return homeDoctorMapper.deleteHomeDoctorByIds(ids);
    }

    /**
     * 删除医生管理信息
     * 
     * @param id 医生管理主键
     * @return 结果
     */
    @Override
    public int deleteHomeDoctorById(Long id)
    {
        return homeDoctorMapper.deleteHomeDoctorById(id);
    }

    @Override
    public HomeDoctor selectHomeDoctorBySysUserId(Long sysUserId) {
        HomeDoctor homeDoctor = homeDoctorMapper.selectHomeDoctorIdBySysUserId(sysUserId);
        return homeDoctor;
    }

    @Override
    public List<HomeTag> selectHomeTagByDoctorId(Long id) {
        List<HomeTag> homeTags = homeDoctorMapper.selectHomeTagByDoctorId(id);
        return homeTags;
    }

}
